const nedb_1 = require("tiny-entity/nedb");
const config = require("../../config");


class MStoreDataContext extends nedb_1.DataContext {
  constructor() {
    super({
      FilePath: config.nedb.dataRootDir + "/",
      DBName: config.nedb.dbName,
      IsMulitTabel: true
    });


    this.store = new Store(this);
    this.orderList = new OrderList(this);
  }

  get Store() {
    return this.store;
  }
  get OrderList() {
    return this.orderList;
  }
}
exports.MStoreDataContext = MStoreDataContext;



class Store extends nedb_1.EntityObject {
  constructor(...args) {
    super(...args)
    this.storeId = '';
    this.CurrentSerialNo = 0;
    this.appid = "";
    this.appsecret = "";
    this.partnerKey = "";
    this.mchId = "";
  }

  toString() {
    return "Store";
  }
}
exports.Store = Store;

class OrderList extends nedb_1.EntityObject {
  constructor(...args) {
    super(...args)
    this.storeId = "";
    this.orderId = "";
    this.openid = "";
    this.createTime = "";
    this.id = ""
  }

  toString() {
    return "OrderList";
  }
}
exports.OrderList = OrderList;
